$OpenBSD: patch-src_tk_tkcmds_c,v 1.2 2017/05/09 13:01:42 espie Exp $
Index: src/tk/tkcmds.c
--- src/tk/tkcmds.c.orig
+++ src/tk/tkcmds.c
@@ -545,7 +545,7 @@ Tk_WinfoCmd(clientData, interp, argc, argv)
 		    argv[0], " atom name\"", (char *) NULL);
 	    return TCL_ERROR;
 	}
-	sprintf(interp->result, "%d", Tk_InternAtom(tkwin, argv[2]));
+	sprintf(interp->result, "%lu", Tk_InternAtom(tkwin, argv[2]));
     } else if ((c == 'a') && (strncmp(argv[1], "atomname", length) == 0)
 	    && (length >= 5)) {
 	Atom atom;
@@ -628,7 +628,7 @@ Tk_WinfoCmd(clientData, interp, argc, argv)
 	sprintf(interp->result, "%d", Tk_Height(window));
     } else if ((c == 'i') && (strcmp(argv[1], "id") == 0)) {
 	SETUP("id");
-	sprintf(interp->result, "0x%x", Tk_WindowId(window));
+	sprintf(interp->result, "0x%lx", Tk_WindowId(window));
     } else if ((c == 'i') && (strncmp(argv[1], "interps", length) == 0)
 	    && (length >= 2)) {
 	if (argc != 2) {
